import request from '@/utils/request'

// 查询采购需求列表
export function listPurchaseRequire(query) {
  return request({
    url: '/storage/require/list',
    method: 'get',
    params: query
  })
}
// 查询采购需求列表
export function listSupplier(query) {
  return request({
    url: '/storage/supplier/list',
    method: 'get',
    params: query
  })
}

// 查询采购需求列表
export function listRequire(data) {
  return request({
    url: '/storage/require/listRequire/'+data.skuIds+'/'+data.skuName,
    method: 'get'
  })
}

// 查询采购需求详细
export function getPurchaseRequire(requireId) {
  return request({
    url: '/storage/require/' + requireId,
    method: 'get'
  })
}

// 新增采购需求
export function addPurchaseRequire(data) {
  return request({
    url: '/storage/require',
    method: 'post',
    data: data
  })
}

// 修改采购需求
export function updatePurchaseRequire(data) {
  return request({
    url: '/storage/require',
    method: 'put',
    data: data
  })
}

// 删除采购需求
export function delPurchaseRequire(requireId) {
  return request({
    url: '/storage/require/' + requireId,
    method: 'delete'
  })
}
